package dao;

/**
 *
 * @author Alex
 */
public class EntityAlreadyExistsException extends Exception
{
    private String name;
    private Object id;

    public EntityAlreadyExistsException(Object name, Object id) {
        this.name = name.getClass().getSimpleName();
        this.id = id;
    }

    @Override
    public String toString()
    {
        return "L'entité " + name + " id " + id + " existe déjà.";
    }


}
